package com.anjubao.parking.municipal.user.config;

import com.anjubao.parking.municipal.user.component.sms.AliSmsProperties;
import com.anjubao.parking.municipal.user.component.sms.AliSmsTemplate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * 阿里消费服务
 * @author zhuchunfeng
 */
@Configuration
@EnableConfigurationProperties(AliSmsProperties.class)
public class AliSmsConfiguration {

  @Bean
  public AliSmsTemplate aliSmsTemplate(@Autowired AliSmsProperties aliSmsProperties) {
    return new AliSmsTemplate(aliSmsProperties);
  }

}
